﻿//作者：       minjie.zhou
// 创建时间：   2012/12/11 0:06:51
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using YDNoteOpenAPI4N.YDAPI;
using YDNoteOpenAPI4N.YDConsumer;

namespace YDNoteOpenAPI4N.Test.WPF
{
    /// <summary>
    /// Page2.xaml 的交互逻辑
    /// </summary>
    public partial class Page2 : Page
    {
        public Page2()
        {
            InitializeComponent();
        }

        public void  NavigationService_Navigated(object sender, NavigationEventArgs e)
        {
            lbl.Text = OAuthHelper.AccessToken;
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
          
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
          
            var api = new YDUserAPI(OAuthHelper.Consumer,OAuthHelper.AccessToken);
            var ydUser = api.GetUserInfo();
            this.lbl.Text = ydUser.user;
        }

    }
}
